Integrand size = 20, antiderivative size = 58 \[ \int (d x)^m \left (a+b x^n+c x^{2 n}\right ) \, dx=\frac {b x^{1+n} (d x)^m}{1+m+n}+\frac {c x^{1+2 n} (d x)^m}{1+m+2 n}+\frac {a (d x)^{1+m}}{d (1+m)} \]
Time = 0.10 (sec) , antiderivative size = 41, normalized size of antiderivative = 0.71 \[ \int (d x)^m \left (a+b x^n+c x^{2 n}\right ) \, dx=x (d x)^m \left (\frac {a}{1+m}+x^n \left (\frac {b}{1+m+n}+\frac {c x^n}{1+m+2 n}\right )\right ) \]
Time = 0.20 (sec) , antiderivative size = 58, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {1691, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (d x)^m \left (a+b x^n+c x^{2 n}\right ) \, dx\) |
\(\Big \downarrow \) 1691 |
\(\displaystyle \int \left (a (d x)^m+b x^n (d x)^m+c x^{2 n} (d x)^m\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {a (d x)^{m+1}}{d (m+1)}+\frac {b x^{n+1} (d x)^m}{m+n+1}+\frac {c x^{2 n+1} (d x)^m}{m+2 n+1}\) |
(b*x^(1 + n)*(d*x)^m)/(1 + m + n) + (c*x^(1 + 2*n)*(d*x)^m)/(1 + m + 2*n) + (a*(d*x)^(1 + m))/(d*(1 + m))
3.6.98.3.1 Defintions of rubi rules used
Int[((d_.)*(x_))^(m_.)*((a_) + (c_.)*(x_)^(n2_.) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d*x)^m*(a + b*x^n + c*x^(2*n))^p, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && EqQ[n2, 2*n] && IGtQ[p, 0] && !IntegerQ [Simplify[(m + 1)/n]]
Result contains higher order function than in optimal. Order 9 vs. order 3.
Time = 0.16 (sec) , antiderivative size = 172, normalized size of antiderivative = 2.97
method | result | size |
risch | \(\frac {x \left (c \,m^{2} x^{2 n}+c m n \,x^{2 n}+x^{n} b \,m^{2}+2 m b \,x^{n} n +2 x^{2 n} c m +c \,x^{2 n} n +a \,m^{2}+3 a m n +2 a \,n^{2}+2 m b \,x^{n}+2 b \,x^{n} n +c \,x^{2 n}+2 a m +3 a n +b \,x^{n}+a \right ) d^{m} x^{m} {\mathrm e}^{\frac {i \pi \,\operatorname {csgn}\left (i d x \right ) m \left (\operatorname {csgn}\left (i d x \right )-\operatorname {csgn}\left (i x \right )\right ) \left (-\operatorname {csgn}\left (i d x \right )+\operatorname {csgn}\left (i d \right )\right )}{2}}}{\left (1+m \right ) \left (1+m +n \right ) \left (1+m +2 n \right )}\) | \(172\) |
parallelrisch | \(\frac {x \,x^{2 n} \left (d x \right )^{m} c +3 x \left (d x \right )^{m} a n +x \left (d x \right )^{m} a +2 x \left (d x \right )^{m} a \,n^{2}+x \,x^{n} \left (d x \right )^{m} b +2 x \,x^{n} \left (d x \right )^{m} b m n +x \,x^{2 n} \left (d x \right )^{m} c m n +x \,x^{n} \left (d x \right )^{m} b \,m^{2}+x \,x^{2 n} \left (d x \right )^{m} c \,m^{2}+2 x \,x^{n} \left (d x \right )^{m} b m +2 x \,x^{n} \left (d x \right )^{m} b n +2 x \,x^{2 n} \left (d x \right )^{m} c m +x \,x^{2 n} \left (d x \right )^{m} c n +3 x \left (d x \right )^{m} a m n +x \left (d x \right )^{m} a \,m^{2}+2 x \left (d x \right )^{m} a m}{\left (1+m \right ) \left (1+m +n \right ) \left (1+m +2 n \right )}\) | \(222\) |
x*(c*m^2*(x^n)^2+c*m*n*(x^n)^2+x^n*b*m^2+2*m*b*x^n*n+2*m*c*(x^n)^2+c*(x^n) ^2*n+a*m^2+3*a*m*n+2*a*n^2+2*m*b*x^n+2*b*x^n*n+c*(x^n)^2+2*a*m+3*a*n+b*x^n +a)/(1+m)/(1+m+n)/(1+m+2*n)*d^m*x^m*exp(1/2*I*Pi*csgn(I*d*x)*m*(csgn(I*d*x )-csgn(I*x))*(-csgn(I*d*x)+csgn(I*d)))
Leaf count of result is larger than twice the leaf count of optimal. 142 vs. \(2 (58) = 116\).
Time = 0.28 (sec) , antiderivative size = 142, normalized size of antiderivative = 2.45 \[ \int (d x)^m \left (a+b x^n+c x^{2 n}\right ) \, dx=\frac {{\left (c m^{2} + 2 \, c m + {\left (c m + c\right )} n + c\right )} x x^{2 \, n} e^{\left (m \log \left (d\right ) + m \log \left (x\right )\right )} + {\left (b m^{2} + 2 \, b m + 2 \, {\left (b m + b\right )} n + b\right )} x x^{n} e^{\left (m \log \left (d\right ) + m \log \left (x\right )\right )} + {\left (a m^{2} + 2 \, a n^{2} + 2 \, a m + 3 \, {\left (a m + a\right )} n + a\right )} x e^{\left (m \log \left (d\right ) + m \log \left (x\right )\right )}}{m^{3} + 2 \, {\left (m + 1\right )} n^{2} + 3 \, m^{2} + 3 \, {\left (m^{2} + 2 \, m + 1\right )} n + 3 \, m + 1} \]
((c*m^2 + 2*c*m + (c*m + c)*n + c)*x*x^(2*n)*e^(m*log(d) + m*log(x)) + (b* m^2 + 2*b*m + 2*(b*m + b)*n + b)*x*x^n*e^(m*log(d) + m*log(x)) + (a*m^2 + 2*a*n^2 + 2*a*m + 3*(a*m + a)*n + a)*x*e^(m*log(d) + m*log(x)))/(m^3 + 2*( m + 1)*n^2 + 3*m^2 + 3*(m^2 + 2*m + 1)*n + 3*m + 1)
Leaf count of result is larger than twice the leaf count of optimal. 1096 vs. \(2 (49) = 98\).
Time = 3.36 (sec) , antiderivative size = 1096, normalized size of antiderivative = 18.90 \[ \int (d x)^m \left (a+b x^n+c x^{2 n}\right ) \, dx=\text {Too large to display} \]
Piecewise(((a + b + c)*log(x)/d, Eq(m, -1) & Eq(n, 0)), ((a*log(x) + b*x** n/n + c*x**(2*n)/(2*n))/d, Eq(m, -1)), (a*Piecewise((0**(-2*n - 1)*x, Eq(d , 0)), (Piecewise((-1/(2*n*(d*x)**(2*n)), Ne(n, 0)), (log(d*x), True))/d, True)) + b*Piecewise((-x*x**n*(d*x)**(-2*n - 1)/n, Ne(n, 0)), (x*x**n*(d*x )**(-2*n - 1)*log(x), True)) + c*x*x**(2*n)*(d*x)**(-2*n - 1)*log(x), Eq(m , -2*n - 1)), (a*Piecewise((0**(-n - 1)*x, Eq(d, 0)), (Piecewise((-1/(n*(d *x)**n), Ne(n, 0)), (log(d*x), True))/d, True)) + b*x*x**n*(d*x)**(-n - 1) *log(x) + c*Piecewise((x*x**(2*n)*(d*x)**(-n - 1)/n, Ne(n, 0)), (x*x**(2*n )*(d*x)**(-n - 1)*log(x), True)), Eq(m, -n - 1)), (a*m**2*x*(d*x)**m/(m**3 + 3*m**2*n + 3*m**2 + 2*m*n**2 + 6*m*n + 3*m + 2*n**2 + 3*n + 1) + 3*a*m* n*x*(d*x)**m/(m**3 + 3*m**2*n + 3*m**2 + 2*m*n**2 + 6*m*n + 3*m + 2*n**2 + 3*n + 1) + 2*a*m*x*(d*x)**m/(m**3 + 3*m**2*n + 3*m**2 + 2*m*n**2 + 6*m*n + 3*m + 2*n**2 + 3*n + 1) + 2*a*n**2*x*(d*x)**m/(m**3 + 3*m**2*n + 3*m**2 + 2*m*n**2 + 6*m*n + 3*m + 2*n**2 + 3*n + 1) + 3*a*n*x*(d*x)**m/(m**3 + 3* m**2*n + 3*m**2 + 2*m*n**2 + 6*m*n + 3*m + 2*n**2 + 3*n + 1) + a*x*(d*x)** m/(m**3 + 3*m**2*n + 3*m**2 + 2*m*n**2 + 6*m*n + 3*m + 2*n**2 + 3*n + 1) + b*m**2*x*x**n*(d*x)**m/(m**3 + 3*m**2*n + 3*m**2 + 2*m*n**2 + 6*m*n + 3*m + 2*n**2 + 3*n + 1) + 2*b*m*n*x*x**n*(d*x)**m/(m**3 + 3*m**2*n + 3*m**2 + 2*m*n**2 + 6*m*n + 3*m + 2*n**2 + 3*n + 1) + 2*b*m*x*x**n*(d*x)**m/(m**3 + 3*m**2*n + 3*m**2 + 2*m*n**2 + 6*m*n + 3*m + 2*n**2 + 3*n + 1) + 2*b*...
Time = 0.22 (sec) , antiderivative size = 65, normalized size of antiderivative = 1.12 \[ \int (d x)^m \left (a+b x^n+c x^{2 n}\right ) \, dx=\frac {c d^{m} x e^{\left (m \log \left (x\right ) + 2 \, n \log \left (x\right )\right )}}{m + 2 \, n + 1} + \frac {b d^{m} x e^{\left (m \log \left (x\right ) + n \log \left (x\right )\right )}}{m + n + 1} + \frac {\left (d x\right )^{m + 1} a}{d {\left (m + 1\right )}} \]
c*d^m*x*e^(m*log(x) + 2*n*log(x))/(m + 2*n + 1) + b*d^m*x*e^(m*log(x) + n* log(x))/(m + n + 1) + (d*x)^(m + 1)*a/(d*(m + 1))
Leaf count of result is larger than twice the leaf count of optimal. 557 vs. \(2 (58) = 116\).
Time = 0.28 (sec) , antiderivative size = 557, normalized size of antiderivative = 9.60 \[ \int (d x)^m \left (a+b x^n+c x^{2 n}\right ) \, dx=\frac {c m^{2} x x^{2 \, n} e^{\left (m \log \left (d\right ) + m \log \left (x\right )\right )} + c m n x x^{2 \, n} e^{\left (m \log \left (d\right ) + m \log \left (x\right )\right )} + b m^{2} x x^{n} e^{\left (m \log \left (d\right ) + m \log \left (x\right )\right )} + c m^{2} x x^{n} e^{\left (m \log \left (d\right ) + m \log \left (x\right )\right )} + 2 \, b m n x x^{n} e^{\left (m \log \left (d\right ) + m \log \left (x\right )\right )} + c m n x x^{n} e^{\left (m \log \left (d\right ) + m \log \left (x\right )\right )} + a m^{2} x e^{\left (m \log \left (d\right ) + m \log \left (x\right )\right )} + b m^{2} x e^{\left (m \log \left (d\right ) + m \log \left (x\right )\right )} + c m^{2} x e^{\left (m \log \left (d\right ) + m \log \left (x\right )\right )} + 3 \, a m n x e^{\left (m \log \left (d\right ) + m \log \left (x\right )\right )} + 2 \, b m n x e^{\left (m \log \left (d\right ) + m \log \left (x\right )\right )} + c m n x e^{\left (m \log \left (d\right ) + m \log \left (x\right )\right )} + 2 \, a n^{2} x e^{\left (m \log \left (d\right ) + m \log \left (x\right )\right )} + 2 \, c m x x^{2 \, n} e^{\left (m \log \left (d\right ) + m \log \left (x\right )\right )} + c n x x^{2 \, n} e^{\left (m \log \left (d\right ) + m \log \left (x\right )\right )} + 2 \, b m x x^{n} e^{\left (m \log \left (d\right ) + m \log \left (x\right )\right )} + 2 \, c m x x^{n} e^{\left (m \log \left (d\right ) + m \log \left (x\right )\right )} + 2 \, b n x x^{n} e^{\left (m \log \left (d\right ) + m \log \left (x\right )\right )} + c n x x^{n} e^{\left (m \log \left (d\right ) + m \log \left (x\right )\right )} + 2 \, a m x e^{\left (m \log \left (d\right ) + m \log \left (x\right )\right )} + 2 \, b m x e^{\left (m \log \left (d\right ) + m \log \left (x\right )\right )} + 2 \, c m x e^{\left (m \log \left (d\right ) + m \log \left (x\right )\right )} + 3 \, a n x e^{\left (m \log \left (d\right ) + m \log \left (x\right )\right )} + 2 \, b n x e^{\left (m \log \left (d\right ) + m \log \left (x\right )\right )} + c n x e^{\left (m \log \left (d\right ) + m \log \left (x\right )\right )} + c x x^{2 \, n} e^{\left (m \log \left (d\right ) + m \log \left (x\right )\right )} + b x x^{n} e^{\left (m \log \left (d\right ) + m \log \left (x\right )\right )} + c x x^{n} e^{\left (m \log \left (d\right ) + m \log \left (x\right )\right )} + a x e^{\left (m \log \left (d\right ) + m \log \left (x\right )\right )} + b x e^{\left (m \log \left (d\right ) + m \log \left (x\right )\right )} + c x e^{\left (m \log \left (d\right ) + m \log \left (x\right )\right )}}{m^{3} + 3 \, m^{2} n + 2 \, m n^{2} + 3 \, m^{2} + 6 \, m n + 2 \, n^{2} + 3 \, m + 3 \, n + 1} \]
(c*m^2*x*x^(2*n)*e^(m*log(d) + m*log(x)) + c*m*n*x*x^(2*n)*e^(m*log(d) + m *log(x)) + b*m^2*x*x^n*e^(m*log(d) + m*log(x)) + c*m^2*x*x^n*e^(m*log(d) + m*log(x)) + 2*b*m*n*x*x^n*e^(m*log(d) + m*log(x)) + c*m*n*x*x^n*e^(m*log( d) + m*log(x)) + a*m^2*x*e^(m*log(d) + m*log(x)) + b*m^2*x*e^(m*log(d) + m *log(x)) + c*m^2*x*e^(m*log(d) + m*log(x)) + 3*a*m*n*x*e^(m*log(d) + m*log (x)) + 2*b*m*n*x*e^(m*log(d) + m*log(x)) + c*m*n*x*e^(m*log(d) + m*log(x)) + 2*a*n^2*x*e^(m*log(d) + m*log(x)) + 2*c*m*x*x^(2*n)*e^(m*log(d) + m*log (x)) + c*n*x*x^(2*n)*e^(m*log(d) + m*log(x)) + 2*b*m*x*x^n*e^(m*log(d) + m *log(x)) + 2*c*m*x*x^n*e^(m*log(d) + m*log(x)) + 2*b*n*x*x^n*e^(m*log(d) + m*log(x)) + c*n*x*x^n*e^(m*log(d) + m*log(x)) + 2*a*m*x*e^(m*log(d) + m*l og(x)) + 2*b*m*x*e^(m*log(d) + m*log(x)) + 2*c*m*x*e^(m*log(d) + m*log(x)) + 3*a*n*x*e^(m*log(d) + m*log(x)) + 2*b*n*x*e^(m*log(d) + m*log(x)) + c*n *x*e^(m*log(d) + m*log(x)) + c*x*x^(2*n)*e^(m*log(d) + m*log(x)) + b*x*x^n *e^(m*log(d) + m*log(x)) + c*x*x^n*e^(m*log(d) + m*log(x)) + a*x*e^(m*log( d) + m*log(x)) + b*x*e^(m*log(d) + m*log(x)) + c*x*e^(m*log(d) + m*log(x)) )/(m^3 + 3*m^2*n + 2*m*n^2 + 3*m^2 + 6*m*n + 2*n^2 + 3*m + 3*n + 1)
Time = 8.93 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.43 \[ \int (d x)^m \left (a+b x^n+c x^{2 n}\right ) \, dx={\left (d\,x\right )}^m\,\left (\frac {a\,x}{m+1}+\frac {b\,x\,x^n\,\left (m+2\,n+1\right )}{m^2+3\,m\,n+2\,m+2\,n^2+3\,n+1}+\frac {c\,x\,x^{2\,n}\,\left (m+n+1\right )}{m^2+3\,m\,n+2\,m+2\,n^2+3\,n+1}\right ) \]